import request from '@/config/axios'

export interface UserVO {
                    nickName: string
                    avatar: string
                    sign: string
                    gender: number
                    birthday: localdate
                    id: number
}

// 查询预约用户列表
export const getUserPage = async (params) => {
  return await request.get({ url: '/vrs/user/page', params })
}

// 查询预约用户详情
export const getUser = async (id: number) => {
  return await request.get({ url: '/vrs/user/get?id=' + id })
}

// 新增预约用户
export const createUser = async (data: UserVO) => {
  return await request.post({ url: '/vrs/user/create', data })
}

// 修改预约用户
export const updateUser = async (data: UserVO) => {
  return await request.put({ url: '/vrs/user/update', data })
}

// 删除预约用户
export const deleteUser = async (id: number) => {
  return await request.delete({ url: '/vrs/user/delete?id=' + id })
}

// 导出预约用户 Excel
export const exportUserApi = async (params) => {
  return await request.download({ url: '/vrs/user/export-excel', params })
}